import 'package:flutter/material.dart';

class DialogContent extends StatefulWidget {
  final String label;
 
  DialogContent({Key key, this.label}) : super(key: key);
 
  @override
  State<StatefulWidget> createState() => DialogContentState();
}
 
class DialogContentState extends State<DialogContent> {
  String label = '';
 
  @override
  void initState() {
    super.initState();
    label = widget.label;
  }
 
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GestureDetector(
        child: Text(label),
        onTap: () {
          setState(() {
            label = 'test9';
          });
        },
      ),
    );
  }
}